package com.example.llm.sgg.sgglangchain.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(wiringMode = AiServiceWiringMode.EXPLICIT,
        streamingChatModel = "openAiStreamingChatModel",
        chatMemoryProvider = "xiaozhiChatMemoryProvider",
        tools = {"appointmentTools"},
        contentRetriever = "contentRetrieverXiaozhi")
public interface StreamXiaozhiAgent {

    @SystemMessage(fromResource = "prompt/xiaozhi-doctor.txt")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String message);
}
